int** matrixReshape(int** mat, int matSize, int* matColSize, int r, int c, int* returnSize, int** returnColumnSizes){
    //改变矩阵形状。
    if(r*c!=matSize*(matColSize[0])){//不能改变，输出原矩阵
        *returnSize = matSize;
        *returnColumnSizes = matColSize;
        return mat;
    }
    int **ans = (int**)calloc(r,sizeof(int*));
    returnSize[0] = r;
    returnColumnSizes[0] = (int*)calloc(r,sizeof(int));
    for(int i = 0;i<r;i++){//初始化新矩阵
        returnColumnSizes[0][i] = c;
        ans[i]=(int*)calloc(c,sizeof(int));
    }
    for(int i = 0;i<r*c;i++){//新矩阵赋值
        ans[i/c][i%c] = mat[i/matColSize[0]][i%matColSize[0]];
    }
    return ans;
}